﻿@{
    Layout = null;
}
@using MvcMall.AdminPortal.Controllers.AdminMenu.ViewModels;
@model SaveAdminMenuModel
<!DOCTYPE html>
<html>
<head>
    <title>新增/保存菜单</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script>
        $(function () {
            $("#tabs").tabs({
                ajaxOptions: {
                    error: function (xhr, status, index, anchor) {
                        $(anchor.hash).html("系统繁忙,请稍候再试");
                    }
                }
            });
        });
    </script>
</head>
<body>
    <div id="tabs">
        <ul>
            <li><a href="#saveMenu">新增/保存菜单</a> </li>
        </ul>
        <div id="saveMenu">
            @using (Html.BeginForm("Save"))
            {
                @Html.HiddenFor(m => m.MenuId)
                <div class="editor-label">
                    @Html.LabelFor(m => m.ModulId)
                </div>
                <div class="editor-field">
                    @Html.DropDownListFor(m => m.ModulId, ViewData["ModulList"] as IEnumerable<SelectListItem>)
                    @Html.ValidationMessageFor(m => m.ModulId)
                </div>
                
                <div class="editor-label">
                    @Html.LabelFor(m => m.MenuName)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.MenuName)
                    @Html.ValidationMessageFor(m => m.MenuName)
                </div>
                
                <div class="editor-label">
                    @Html.LabelFor(m => m.ControllerName)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.ControllerName)
                    @Html.ValidationMessageFor(m => m.ControllerName)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(m => m.ActionName)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.ActionName)
                    @Html.ValidationMessageFor(m => m.ActionName)
                </div>
                
                <div class="editor-label">
                    @Html.LabelFor(m => m.SortOrder)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.SortOrder)
                    @Html.ValidationMessageFor(m => m.SortOrder)
                </div>
              
                <p>
                    <input type="submit" value="保存" /></p>
            }
        </div>
    </div>
</body>
</html>
